<?php
/*
Plugin Name: Romina Blog
Plugin URI: http://un-petit-p.eu
Description: handle the url associate with some posts
Author: olivM
Version: 0.1
Author URI: http://un-petit-p.eu
*/



function bmg_save_post($post_id) {

		$key = 'website';
		$value = $_POST['post_website'];
		delete_post_meta($post_id, $key);
		add_post_meta($post_id, $key, $value);
		
}

add_action('save_post', 'bmg_save_post');


function romina_edit_form_advanced() {
	global $post_ID;

    ?>
	<fieldset id="websitediv">
		<legend>URL du site</legend>
		<div>
			<input id="website" type="text" value="<?=get_post_meta($post_ID, 'website', true)?>" tabindex="1" size="30" name="post_website"/>
		</div>
	</fieldset>
    <?
}
	
add_action('edit_form_advanced', 'romina_edit_form_advanced');


?>
